package ink.lovejinhu.leetcode;

/**
 * @author jinhu
 * created 2021-07-31 18:53
 */
public class Solution_0674 {
    public int findLengthOfLCIS(int[] nums) {
        int start = 0;
        int end = 0;
        int max = 0;
        for (int i = 1; i < nums.length; i++) {
            if (nums[i] > nums[i - 1]) {
                end = i;
            } else {
                if (end - start + 1 > max) {
                    max = end - start + 1;
                }
                if (max > nums.length - i + 1) {
                    return max;
                }
                start = i;
                end = i;

            }
        }
        return end - start + 1;
    }
}
